﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLDC.Common.Estate;

namespace ZLDC.Estate.TM
{
    public partial class SystemOperationLog : _PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) 
            {
                Shour1.Items.Add("请选择");
                Shour2.Items.Add("请选择");
                for (int i = 0; i <=23; i++)
                {
                    if (i < 10)
                    {
                        Shour1.Items.Add("0" + i);
                        Shour2.Items.Add("0" + i);
                    }
                    else
                    {
                        Shour1.Items.Add("" + i);
                        Shour2.Items.Add("" + i);
                    }
                }
                
                AddDeptTree();
                
            }
        }


        /// <summary>
        /// 选择部门树形菜单
        /// </summary>
        private void AddDeptTree()
        {
            string sTopDept = this.info.m_sDeptID;//默认取表中第一行为最上层部门
            string deptid_list = CacheUtility.Cache_GetAllChildDept(this.info.m_sDeptID);

            //sTopDept = ConfigurationSettings.AppSettings["SalesDepartment"].ToString().Trim();//最上层部门

            ZLDC.Topo.BLL.Estate.DeptTree zdt = new ZLDC.Topo.BLL.Estate.DeptTree(sTopDept, deptid_list);
            ltlDeptTree.Text = zdt.GetZlhqDept();
        }
    }
}
